home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
findfuncs.README
< prev
next >
Wrap
Text File
|
1994-08-02
|
5KB
|
103 lines
~4Dgifts/toolbox/README.findfuncs README
findfuncs: is a shell-script providing search lookup and
locate capabilities based on a multiple-keyword
list composed of library function-names for the
public, lib and src subtrees of the Toolbox.
this README explains the findfuncs script located in the top-level
directory of the Toolbox tree.
as a shell-script alternative to the sifttree GUI, findfuncs
enables identification of a program or programs implementing the
list of library functions specified on the command line.
an hypothetical example wud be wanting to find all programs using
IRIS GL zbuffer and pixmode library functions:
< 212 ratmandu /4Dgifts/toolbox> findfuncs zbuffer pixmode
src/demos/REALITY/fastshadows/shad
src/demos/REALITY/fastshadows/shad.c
src/exampleCode/cap/src/cap
src/exampleCode/cap/tools/interp.c
src/exampleCode/stencil/gameOfLife
shad, cap and gameOfLife are all ELF 32-bit MSB dynamic executable
(not stripped) MIPS binary files. notice findfuncs' ability to point
to the specific source file(s) where the matches occur as well as
the binary. in the case of gameOfLife, there is only one source file
for which building an intermediate .o file was unnecessary. the
creation of the functions.INDEX file is based on all "ELF 32-bit MSB
relocatable MIPS" (.o) files and "ELF 32-bit MSB dynamic executable
(not stripped) MIPS" (binary) files (the nomenclature here dervies
from file(1)). this is why the reference only points to the
gameOfLife binary, not to the source file.
BUGS
for now, you must type the function(s) of interest with the proper
and exact UPPER and lower -case characters. in v4.0 there is an
anomoly with look(1), discovered by Dave Olson, wherein the -f flag
("Upper case letters compare equal to lower case.") does not work
as advertized. as of the time we went to "press", we were not able
to ascertain the reason for this. if you are uncertain of the
function name's proper UPPER/lower -case letters, run
[f][e]grep -i functionname searchtools/functions.INDEX
this will list the function's exact spelling as you will need to
specify in concert with findfuncs.
Explanation of the Script-Logic behind findfuncs
------------------------------------------------
we include this explanation since the uses of this search-mechanism
are eminently generalizable beyond its implementation here. since
the Toolbox's raison d'etre is to provide tools--the more generic the
better--we're extremely pleased to pass along this bit of "home-grown"
inspired work.
findfuncs and the script ("getobjs") employed to generate the
functions.INDEX file were created by that master (among MANY other
things) of sed and elfdump, Dave Olson. Dave generously donated his
time to work up the two-levels of script-logic which provide a fast
and effective way of identifying program source code of interest
anywhere in the "public," "lib" and "src" toolbox subtrees. In
essence, the mechanics employed to do this are:
1.) with getobjs use find(1), sed(1), elfdump(1-SYSV), odump(1),
and /usr/lib/c++/c++filt, create the INDEX master "keyword
list" file (renamed functions.INDEX for this application)
associating all library functions invoked in object files
with their equivalent source file as well as the program's
binary, and then
2.) with findfuncs, a pointer to Dave's script named refjoin,
use look(1), join(1) and sed(1) to sift the INDEX file for
all mutually-inclusive occurences of the list of library
functions and write to stdout the paths to where these
functions reside.
NOTE: getobjs assumes it is using the elfdump from the 3.18 compilers
being released with IRIX 5.2. in case you don't have IRIX 5.2
with the 3.18 compilers yet, and you want to use getobjs
yerself, a copy of the newer elfdump is included in the
searchtools directory. you must use this version with getobjs
--any earlier version of elfdump than this will not work
correctly with getobjs.
FILES
toolbox/findfuncs top-level symlink to refjoin
toolbox/searchtools/functions.INDEX index of all fxns w/their src/binary
toolbox/searchtools/refjoin script for searching functions.INDEX
toolbox/searchtools/getobjs script to build functions.INDEX
toolbox/searchtools/elfdump 3.18 compilers version needed by getobjs
toolbox/searchtools/look used to find/print funcs fed to findfuncs
toolbox/searchtools/look.man look man page
toolbox/searchtools/look.c look source code